package p400.srm474;

import java.util.Arrays;
import java.util.HashMap;

import utils.ExampleRunner;

/**
 * Created by IntelliJ IDEA.
 * User: smalex
 * Date: 03.04.11
 * Time: 20:22
 */
public class RouteIntersection {
  public String isValid(int N, int[] coords, String moves) {
    int k = moves.length();
    HashMap<Integer, Integer> mapIndex = new HashMap<Integer, Integer>();
    int lastIndex = 0;
    for (int coord : coords) {
      Integer index = mapIndex.get(coord);
      if (index == null) {
        index = lastIndex++;
        mapIndex.put(coord, index);
      }
    }
    int[][] rows = new int[k + 1][k];
    for (int i = 0; i < k; i++) {
      for (int j = 0; j < k; j++) {
        rows[i + 1][j] = rows[i][j];
      }
      final Integer index = mapIndex.get(coords[i]);
      if ((int) moves.charAt(i) == (int) '+') {
        rows[i + 1][index]++;
      } else {
        rows[i + 1][index]--;
      }
    }
    for (int i = 0; i < rows.length; i++) {
      for (int j = 0; j < rows.length; j++) {
        if (i != j) {
          if (Arrays.equals(rows[i], rows[j])) {
            return "NOT VALID";
          }
        }
      }
    }
    return "VALID";
  }

  public static void main(String[] args) {
    ExampleRunner.eq(1, "VALID", new RouteIntersection().isValid(1, new int[]{1}, "+"));
    ExampleRunner.eq(2, "NOT VALID", new RouteIntersection().isValid(2, new int[]{1, 2, 1, 2}, "++--"));
    ExampleRunner.eq(3, "VALID", new RouteIntersection().isValid(3, new int[]{1, 2, 3, 1, 2}, "+++--"));
    ExampleRunner.eq(4, "NOT VALID", new RouteIntersection().isValid(344447, new int[]{132, 51717, 628, 344447, 628, 51717, 344447, 2}, "+-++-+--"));
    ExampleRunner.eq(5, "NOT VALID", new RouteIntersection().isValid(1, new int[]{1, 1}, "+-"));
    ExampleRunner.eq(6, "NOT VALID", new RouteIntersection().isValid(1000000, new int[]{78566, 108056, 553636, 351059, 132377, 132377, 623194, 168159, 440977, 456781, 269416, 762903, 540613, 242440, 791969, 78830, 239094, 990646, 440977, 765458, 168159, 28026, 758759, 484909, 939814, 93500, 762903, 97664}, "+----+-+--++++---+--+-+--++-"));
    ExampleRunner.eq(7, "NOT VALID", new RouteIntersection().isValid(861534, new int[]{760377, 165924, 165924, 758759, 28026, 269416, 791969, 28026, 503363, 720516, 853121, 765458, 165924, 269416, 340980, 351059}, "+-+++++-+--+----"));
    ExampleRunner.eq(8, "NOT VALID", new RouteIntersection().isValid(1000000, new int[]{754690, 762903, 269315, 108056, 669945, 392437, 581069, 168159, 940783, 441476, 317306, 764853, 242440, 108056, 28026, 833196, 351059, 833196, 108056, 242440, 754690, 735536, 735536, 253284, 108056, 918066, 130873, 108056, 269416, 669945, 760377, 976185, 669945, 758759, 260341, 308594, 269416, 940783, 78830, 168159, 760377, 242440, 669945, 986952}, "--+-++++-+-++-+-+-++--+---+-++-+--+-++-++--+"));
    ExampleRunner.eq(9, "NOT VALID", new RouteIntersection().isValid(919177, new int[]{571384, 623194, 300844, 760377, 242440, 6, 524568, 465356, 754690, 773990, 760377, 760377, 351059, 853121, 440977, 242440, 623194, 494205, 325322, 362536, 168159, 242440, 130873, 898562, 165924}, "+++-----++-++----+---++++"));
    ExampleRunner.eq(10, "NOT VALID", new RouteIntersection().isValid(982586, new int[]{108056, 900616, 6, 97664, 108056, 441476, 581069, 93500, 764853, 571384, 93500, 78830, 764853, 758759, 440977, 762903, 950682, 253411, 465356, 765458, 6, 791969, 503363, 791969, 898562, 669945, 392437, 130873, 242440, 30416, 581069, 553636, 898562, 465356, 82254, 796049, 269315, 465356, 465356}, "+--+-+---------+----+++++-++++-+--+---+"));
    ExampleRunner.eq(11, "NOT VALID", new RouteIntersection().isValid(1000000, new int[]{108056, 387006, 853121, 168159, 465356, 581069, 361515, 796049, 932885, 108056, 168159, 108056, 735536, 940783, 242440, 108056, 132377, 440977, 308594, 735536, 990646, 765458, 939814, 553636, 950682, 212982, 108056, 758759, 78830, 108056, 30416, 269416, 269416, 168159, 108056}, "+--++++--+++++--+-+++--+--++---+---"));
    ExampleRunner.eq(12, "NOT VALID", new RouteIntersection().isValid(1000000, new int[]{765458, 735536, 242440, 503363, 773990, 260341, 97188, 108056, 108056, 976185, 132377, 132377, 988451, 132377, 764853, 97664, 791969, 760377, 440977, 760377, 465356, 82254, 581069, 859193, 168159, 97664, 948414, 939814, 335505, 765458, 859193, 833196, 581069, 524568, 940783, 465356, 132377, 948414, 108056, 762903, 762903, 669945, 514374, 130873, 976185, 130873, 758759}, "-++-++-++-+++-++-+---++---+--+-----++++-++++-+-"));
    ExampleRunner.eq(13, "NOT VALID", new RouteIntersection().isValid(974432, new int[]{165924, 950682, 108056, 918066, 253411, 900616, 269315, 392437, 392437, 361515, 392437, 168159, 440977, 581069, 78566, 108056, 833196, 553636}, "-+++-+--+-++-----+"));
    ExampleRunner.eq(14, "NOT VALID", new RouteIntersection().isValid(999158, new int[]{28026, 765458, 918066, 669945, 30416, 654913, 269315, 791969, 465356, 131665, 643289, 269315, 762903, 392437, 342855, 465356, 484909, 340980, 317306, 242440, 765458, 465356, 239094, 754690, 824639, 165924, 132377, 269416, 132377, 132377, 335505, 765458, 300844, 974918, 97664, 524568, 898562, 269416, 900616}, "-++---++---+-++++-+++++---++-++---+---+"));
    ExampleRunner.eq(15, "NOT VALID", new RouteIntersection().isValid(943893, new int[]{387006, 524568, 132377, 269416, 325322, 253284, 131665, 540613, 392437, 392437, 441476, 465356, 932885, 465356, 130873, 269416, 623194, 623194, 824639, 465356, 859193, 623194, 932885, 130873, 168159, 932885, 351059, 242440, 78830}, "+--++-++-+--+-++++-+-++-+++++"));
    ExampleRunner.eq(16, "NOT VALID", new RouteIntersection().isValid(947930, new int[]{165924, 796049, 108056, 654913, 440977, 93500, 571384, 754690, 669945, 30416, 61078, 939814, 108056, 108056, 503363, 440977}, "++++---+-----+-+"));
    ExampleRunner.eq(17, "NOT VALID", new RouteIntersection().isValid(1000000, new int[]{758759, 623194, 342855, 61078, 108056, 514374, 940783, 758759, 760377, 758759, 260341, 441476, 256008, 300844, 260341, 465356, 269315, 28026, 28026, 760377, 581069, 130873, 78566, 108056, 791969, 791969, 940783, 571384, 242440, 78830, 440977, 93500, 990646, 735536, 253284, 760377, 762903, 762903, 765458}, "------+-++-++---+--+--++-+-+-++-++-+--+"));
    ExampleRunner.eq(18, "NOT VALID", new RouteIntersection().isValid(991907, new int[]{833196, 465356, 581069, 948414, 765940, 294126, 168159, 97188, 986952, 465356, 765940, 465356, 465356, 623194, 108056, 976185, 78830, 859193, 939814, 78830, 256008, 669945, 976185, 758759, 242440, 108056, 791451, 168159, 108056, 253284, 121023, 859193}, "-++-++-+++++-----+-----+-++-+--+"));
    ExampleRunner.eq(19, "NOT VALID", new RouteIntersection().isValid(988351, new int[]{581069, 974918, 553636, 581069, 791451, 269315, 898562, 308594, 791969, 976185, 581069, 132377, 165924, 93500, 853121, 765458, 340980, 168159, 762903, 939103, 392437, 940783, 765458, 765458, 294126, 898562, 623194, 61078, 130873, 242440, 78830, 132377, 765940}, "-+--+-+-+---+--++--++++---+-+-+--"));
    ExampleRunner.eq(20, "NOT VALID", new RouteIntersection().isValid(991080, new int[]{824639, 212982, 108056, 387006, 132377, 898562, 553636, 456781, 6, 440977, 108056, 108056, 888348, 988451, 465356, 773990, 168159, 467412, 898562, 758759, 760377, 623194, 325322, 467412, 239094, 940783, 392437, 325322, 762903, 494205, 20338, 269315, 20338, 231432, 269315, 30416, 939103, 20338}, "++-+-++-++-+-+-+-++--+--++--+-+-++----"));
    ExampleRunner.eq(21, "NOT VALID", new RouteIntersection().isValid(1000000, new int[]{669945, 948414, 242440, 269315, 853121, 988451, 93500, 242440, 796049, 20338, 754690, 465356, 108056, 758759, 465356, 465356, 758759, 791969, 524568, 269416, 540613, 294126, 791969, 242440, 82254, 131665, 888348, 898562, 791969, 392437, 758759, 242440, 308594, 108056, 735536, 754690, 317306, 28026, 253411, 239094, 308594, 762903}, "+--+--++-++++++--+-+++--+-+--+-+---++++-++"));
    ExampleRunner.eq(22, "NOT VALID", new RouteIntersection().isValid(954836, new int[]{824639, 871663, 78830, 30416, 108056, 61078, 735536, 465356, 269416, 308594, 581069, 308594, 939814, 300844, 758759, 242440, 853121, 440977, 440977}, "---++--+---++--+-+-"));
    ExampleRunner.eq(23, "NOT VALID", new RouteIntersection().isValid(1000000, new int[]{940783, 97188, 765458, 898562, 939814, 514374, 467412, 791969, 97664, 853121, 939103, 853121, 720516, 253284, 325322, 500801, 269416, 754690, 758759, 524568, 833196, 735536, 720516, 754690, 791451, 974918, 28026, 440977, 269315, 540613, 465356, 939103, 168159, 168159, 754690, 824639, 859193, 859193, 131665, 253411, 758759, 571384, 581069, 824639, 918066, 108056, 514374}, "--+--+++--+-+++-++-++--++++++-+++-++++-++-+--+-"));
    ExampleRunner.eq(24, "NOT VALID", new RouteIntersection().isValid(948690, new int[]{773990, 392437, 939814, 765940, 165924, 392437, 132377, 242440, 132377, 20338, 28026, 524568, 524568, 242440, 762903, 932885, 765940}, "--++-++-+--+---++"));
    ExampleRunner.eq(25, "NOT VALID", new RouteIntersection().isValid(990630, new int[]{833196, 524568, 361663, 108056, 28026, 824639, 269315, 440977, 440977, 765458, 988451, 242440, 948414, 130873, 773990, 765458, 130873, 28026, 853121, 553636, 581069, 82254, 735536, 833196, 898562, 898562, 940783, 988451, 540613, 317306, 623194, 940783, 571384, 988451, 108056, 514374, 97664}, "--+---+-+++-+-+---++-++-+---+-+--+-++"));
    ExampleRunner.eq(26, "NOT VALID", new RouteIntersection().isValid(999304, new int[]{78830, 168159, 465356, 976185, 212982, 643289, 465356, 97188, 130873, 762903, 762903, 108056, 93500, 754690, 456781, 571384, 132377, 6, 465356, 764853, 939814, 754690, 28026, 28026, 754690, 859193, 6, 168159}, "-++-++-+-++++--+--+-++-+-++-"));
    ExampleRunner.eq(27, "NOT VALID", new RouteIntersection().isValid(989840, new int[]{796049, 204199, 6, 212982, 108056, 765940, 6, 791969, 939814, 907440, 762903, 762903, 571384, 754690, 669945, 791969, 853121, 932885, 900616, 242440, 623194, 78566, 623194, 317306, 871663, 974918, 121023, 494205, 168159, 61078, 78830, 898562, 581069, 581069, 581069, 93500, 108056, 82254, 132377, 61078, 78830, 484909, 78830, 317306, 484909, 108056, 571384}, "-------+--+--------+++++-+----++-+--+-+-+-----+"));
    ExampleRunner.eq(28, "NOT VALID", new RouteIntersection().isValid(1000000, new int[]{773990, 976185, 440977, 28026, 173399, 976185, 988451, 991350, 898562, 991350, 939814, 242440, 898562, 976185, 242440, 108056, 61078, 97664, 351059, 939103, 735536, 256008, 108056, 108056, 440977, 898562, 168159, 78830, 28026, 269416, 108056, 524568, 242440, 168159, 684723, 30416, 6, 494205, 760377, 78566, 571384, 93500, 859193, 467412}, "-----+++++-+++++-----+-+--+--+-+-+--------+-"));
    ExampleRunner.eq(29, "NOT VALID", new RouteIntersection().isValid(991364, new int[]{108056, 108056, 484909, 758759, 82254, 907440, 253411, 898562, 494205, 654913, 765940, 669945, 762903, 130873, 859193, 108056, 853121, 669945, 853121, 684723, 239094, 335505, 765940, 754690, 239094, 212982, 702647, 988451, 765940, 760377, 976185, 121023, 269416, 990646, 824639, 440977, 939814}, "+-+-+-+-+-+-+++--+-+-+++---------++++"));
    ExampleRunner.eq(30, "NOT VALID", new RouteIntersection().isValid(1000000, new int[]{456781, 939103, 859193, 758759, 754690, 465356, 988451, 308594, 571384, 168159, 754690, 524568, 760377, 130873, 28026, 581069, 754690, 760377, 269416, 108056, 853121, 888348, 581069, 791969, 833196, 765458, 108056, 108056, 735536, 168159, 335505, 242440, 269416}, "--+-++------+---++++--+--+-+-+---"));
    ExampleRunner.eq(31, "NOT VALID", new RouteIntersection().isValid(992169, new int[]{791969, 465356, 130873, 796049, 242440, 465356, 61078, 900616, 764853, 93500, 988451, 108056, 108056, 28026, 762903, 108056, 392437, 6, 168159, 28026, 791969, 130873, 540613, 61078, 853121, 907440, 132377, 256008, 764853, 242440, 242440, 762903, 456781, 325322, 853121, 465356, 253284, 623194, 465356, 735536, 888348, 791451, 269315, 833196, 853121, 623194, 130873}, "+---+-----++-----+-+---+--+-+--------+---++++-+"));
    ExampleRunner.eq(32, "NOT VALID", new RouteIntersection().isValid(978422, new int[]{684723, 859193, 974918, 765940, 571384, 108056, 524568, 361663, 900616, 976185, 30416, 28026, 907440, 61078, 791969, 940783, 253411, 308594, 765940, 78830, 791969, 581069, 669945, 888348, 735536, 898562, 735536, 669945, 362536, 335505, 859193, 824639, 762903, 317306, 939814, 758759, 78830, 78830, 165924, 308594}, "-++-+---+++++---++++-----------+-+--+---"));
    ExampleRunner.eq(33, "NOT VALID", new RouteIntersection().isValid(1000000, new int[]{168159, 361515, 392437, 392437, 242440, 165924, 754690, 168159, 524568, 465356, 440977, 108056, 853121, 308594, 898562, 760377, 20338, 308594, 898562, 898562, 791969, 758759, 553636, 669945, 986952, 269416, 669945, 940783, 441476, 571384, 6, 465356, 735536, 643289, 990646, 342855, 524568}, "--+----+-++-++++++--++-+-+++----++++-"));
    ExampleRunner.eq(34, "NOT VALID", new RouteIntersection().isValid(1000000, new int[]{735536, 168159, 467412, 940783, 791969, 465356, 108056, 108056, 108056, 571384, 108056, 524568, 465356, 269416, 6, 900616, 796049, 888348, 465356, 294126, 833196, 253411, 269315, 571384, 30416, 204199, 294126, 758759, 986952, 108056, 859193, 456781, 853121, 121023, 78830, 702647, 308594, 28026, 256008, 362536, 132377, 392437, 765458, 988451, 269315, 78566, 97664, 467412, 82254}, "+---++-++-+-++-++++-++--++++--+-+++--++-+++----+-"));
    ExampleRunner.eq(35, "NOT VALID", new RouteIntersection().isValid(965684, new int[]{940783, 108056, 168159, 939103, 571384, 132377, 132377, 871663, 130873, 20338, 907440, 484909, 918066, 765940, 824639, 440977, 581069, 340980, 581069, 108056, 204199, 78830, 932885, 78566, 760377, 78566, 859193, 168159, 735536, 308594, 791969, 791969, 168159, 939814}, "-+--+-+--+-++-----++++-++++----+++"));
    ExampleRunner.eq(36, "VALID", new RouteIntersection().isValid(988429, new int[]{256008, 760377, 300844, 669945, 108056, 735536, 939814, 765458, 735536, 242440, 212982, 735536, 853121, 242440, 28026, 132377, 765940, 939814, 976185}, "++++----+-+-+--+--+"));
    ExampleRunner.eq(37, "VALID", new RouteIntersection().isValid(902541, new int[]{900616, 108056, 791969, 669945, 553636, 97664, 791969, 623194, 6, 898562, 581069, 168159}, "--+----+++--"));
    ExampleRunner.eq(38, "VALID", new RouteIntersection().isValid(1000000, new int[]{78566, 760377, 669945, 824639, 524568, 165924, 465356, 939103, 392437, 20338, 853121, 269416, 824639, 269416, 30416, 948414, 760377, 669945, 940783, 791969, 988451, 940783, 6, 61078, 269416, 121023, 168159, 97664, 484909, 253284, 859193, 988451, 762903, 765940, 242440, 132377, 465356}, "+-++-+-+++--++-+-++-+-+----+-+++-+++-"));
    ExampleRunner.eq(39, "VALID", new RouteIntersection().isValid(953186, new int[]{97188, 754690, 940783, 735536, 351059, 762903, 440977, 231432, 754690, 762903, 392437, 643289, 168159, 791969, 269315, 765458, 760377, 898562, 300844, 484909, 253411, 824639, 242440, 765940}, "---+--+--++-+-++-+--+--+"));
    ExampleRunner.eq(40, "VALID", new RouteIntersection().isValid(1000000, new int[]{130873, 260341, 78830, 773990, 940783, 300844, 986952, 623194, 253411, 702647, 939814}, "----+--+--+"));
    ExampleRunner.eq(41, "VALID", new RouteIntersection().isValid(958804, new int[]{932885, 465356, 253411, 735536}, "-+++"));
    ExampleRunner.eq(42, "VALID", new RouteIntersection().isValid(978804, new int[]{623194, 764853, 325322, 242440, 441476, 796049, 242440, 6, 269315, 78830, 168159, 253411, 168159, 465356, 758759, 553636, 503363, 30416, 132377, 939814, 253284, 900616, 571384, 735536, 940783, 702647, 242440, 702647, 340980, 392437, 335505, 581069, 765940, 758759, 484909, 791969, 441476, 754690, 976185, 165924, 939814, 765458, 524568, 392437}, "-++-+-++-+++++-++-+--+--------+--+----+++-+-"));
    ExampleRunner.eq(43, "VALID", new RouteIntersection().isValid(1000000, new int[]{387006, 6, 239094, 242440, 791451, 78830, 853121, 108056, 950682, 524568, 939103, 503363, 93500, 760377, 553636, 940783, 108056, 898562, 269416, 168159, 524568, 465356, 465356, 503363, 269315, 940783, 130873, 859193, 173399, 654913, 78830, 494205, 108056, 765940, 108056, 387006, 269315, 669945, 988451, 108056, 131665, 898562, 61078, 130873}, "+---+++-+-+-+-------+--++-+-+++++--+-+--++++"));
    ExampleRunner.eq(44, "VALID", new RouteIntersection().isValid(772651, new int[]{571384, 108056, 269315, 465356, 760377, 269416, 108056, 130873, 108056, 130873, 465356}, "++----+++-+"));
    ExampleRunner.eq(45, "VALID", new RouteIntersection().isValid(1000000, new int[]{108056, 441476, 791969, 256008, 581069, 898562, 581069, 28026, 581069, 28026, 132377, 204199, 269315, 571384, 765940, 986952, 132377, 765458, 61078, 440977, 939103, 253411, 204199, 898562, 242440, 467412, 294126, 269315}, "--+--+---++-++-+----++++----"));
    ExampleRunner.eq(46, "VALID", new RouteIntersection().isValid(1000000, new int[]{765940, 465356, 132377, 484909, 242440, 990646, 669945, 939814, 342855, 494205, 940783, 765940, 760377, 130873, 859193, 168159, 467412}, "-+--+++++++-++-+-"));
    ExampleRunner.eq(47, "VALID", new RouteIntersection().isValid(767214, new int[]{669945, 484909, 465356, 754690}, "-+--"));
    ExampleRunner.eq(48, "VALID", new RouteIntersection().isValid(914676, new int[]{524568, 758759, 720516, 28026, 898562, 253411, 762903, 239094, 859193, 28026, 269416, 791451, 269315, 362536, 484909, 6, 623194, 853121, 325322, 853121, 791969, 204199, 256008, 465356, 760377, 571384, 78830}, "+---+++-+++++--------++-+--"));
    ExampleRunner.eq(49, "VALID", new RouteIntersection().isValid(638175, new int[]{340980, 121023, 623194, 108056, 165924}, "+-+--"));
    ExampleRunner.eq(50, "VALID", new RouteIntersection().isValid(868064, new int[]{791969, 132377, 494205, 581069, 669945, 859193, 256008, 30416}, "++++--++"));
    ExampleRunner.eq(51, "VALID", new RouteIntersection().isValid(1000000, new int[]{269416, 108056, 335505, 132377, 524568, 791451, 898562, 239094, 898562, 108056, 253284, 467412, 754690, 900616, 256008, 108056, 990646, 760377, 392437, 168159, 130873, 6, 78566, 335505, 623194, 524568, 571384, 760377, 853121, 132377, 907440, 242440, 168159, 581069, 898562, 269416, 524568, 253284, 623194, 791969, 765458, 918066, 467412, 242440, 503363}, "-+++-+++-+-+--+-+--+--++++---+++++-------+++-"));
    ExampleRunner.eq(52, "VALID", new RouteIntersection().isValid(949188, new int[]{97188, 581069, 791969, 581069, 108056, 28026, 260341, 623194, 108056, 524568, 269416, 773990, 132377, 791969, 735536, 6, 524568, 269315, 484909, 939103, 108056, 387006, 260341, 269315, 269416, 108056}, "-++-++--+---++++++-+---++-"));
    ExampleRunner.eq(53, "VALID", new RouteIntersection().isValid(965530, new int[]{20338, 581069, 317306, 108056, 853121, 669945, 269416, 939103, 623194, 440977, 735536, 269315, 796049, 204199, 108056, 833196, 859193, 108056, 465356, 643289, 524568, 441476, 93500, 253411, 932885, 204199, 108056, 465356, 762903, 758759, 325322, 684723, 853121, 524568, 950682}, "--+++++-++-++---++++-++-+++++++++--"));
    ExampleRunner.eq(54, "VALID", new RouteIntersection().isValid(1000000, new int[]{108056, 387006, 898562, 28026, 503363, 791451, 78566, 260341, 78830, 97664, 6, 165924, 440977, 78566, 990646, 791969, 294126, 61078}, "-+-++-+-++++-+-++-"));
    ExampleRunner.eq(55, "VALID", new RouteIntersection().isValid(1000000, new int[]{976185, 765940, 669945, 765458, 269416, 97664, 898562, 494205, 28026, 108056, 108056, 108056, 465356, 988451, 30416, 754690, 392437, 888348, 392437, 898562, 108056, 239094, 361515, 939814, 269416, 30416, 765458, 669945, 643289}, "+++-+--+-----+-++----++-++--+"));
    ExampleRunner.eq(56, "VALID", new RouteIntersection().isValid(823247, new int[]{308594, 204199, 465356, 791451, 242440, 571384}, "++--++"));
    ExampleRunner.eq(57, "VALID", new RouteIntersection().isValid(998446, new int[]{581069, 976185, 465356, 108056, 623194, 465356, 260341, 78566, 173399, 524568, 918066, 791969, 900616, 623194, 940783, 898562, 78830, 581069, 990646, 939814, 760377, 940783, 986952, 859193, 571384, 28026, 294126, 440977, 168159, 440977, 932885, 871663, 932885, 853121, 758759, 335505, 988451, 131665, 988451, 392437, 78830}, "-++++++++--++--++++-++--++-++--++-+++++-+"));
    ExampleRunner.eq(58, "VALID", new RouteIntersection().isValid(951375, new int[]{108056, 440977, 859193, 571384, 791969, 269315, 758759, 121023, 503363, 940783, 325322, 239094, 796049, 720516, 571384, 253411, 939103, 78566, 168159, 791969, 540613, 168159, 824639, 720516, 824639, 791969, 269416, 654913, 130873, 108056, 242440, 242440, 540613, 900616, 294126, 465356, 762903, 918066, 97188, 465356}, "+-+++++--+----+++++--+-+--++++--+--++-++"));
    ExampleRunner.eq(59, "VALID", new RouteIntersection().isValid(1000000, new int[]{758759, 976185, 28026, 168159, 859193, 986952, 392437, 440977, 976185, 269315, 859193, 253284, 204199, 976185, 130873, 684723, 939103}, "--++-++----+-+---"));
    ExampleRunner.eq(60, "VALID", new RouteIntersection().isValid(921853, new int[]{484909, 684723, 524568, 300844, 907440, 643289}, "--+++-"));
    ExampleRunner.eq(61, "VALID", new RouteIntersection().isValid(1000000, new int[]{132377, 760377, 440977, 465356, 239094, 669945, 765940, 78830, 465356, 269315, 859193, 465356, 853121, 581069, 242440, 976185, 294126, 168159, 898562}, "--++++--++++--+-++-"));
    ExampleRunner.eq(62, "VALID", new RouteIntersection().isValid(960048, new int[]{571384, 108056, 467412, 465356, 108056, 898562, 524568, 108056, 907440, 20338, 623194, 361515, 524568, 918066, 853121, 939814, 108056, 165924, 168159, 361663, 308594, 253284, 484909, 907440, 30416, 833196, 340980, 294126, 78830, 108056, 735536, 758759, 269315, 581069}, "+++++++-+-+-+-+--+-+++---+++++----"));
    ExampleRunner.eq(63, "VALID", new RouteIntersection().isValid(952108, new int[]{765458, 256008, 28026, 940783}, "-+--"));
    ExampleRunner.eq(64, "VALID", new RouteIntersection().isValid(660611, new int[]{643289}, "+"));
    ExampleRunner.eq(65, "VALID", new RouteIntersection().isValid(992563, new int[]{173399, 735536, 976185, 735536}, "-+--"));
    ExampleRunner.eq(66, "NOT VALID", new RouteIntersection().isValid(1000000, new int[]{998602, 999206, 990663, 991282, 998680, 994545, 996697, 993293, 999071, 993293, 994545, 994545, 997635, 994094, 999071, 999919, 997635, 994545, 993376, 996972, 996496, 993376, 998602, 997760, 991680, 990428}, "--+--+---+-+---+-+-+-+++-+"));
    ExampleRunner.eq(67, "NOT VALID", new RouteIntersection().isValid(1000000, new int[]{993376, 998858, 993376, 991077, 999279, 994094, 996702, 999279, 999206, 990059, 999206, 993800, 994425, 995549, 999279, 991431, 995986, 995549, 992142, 998602, 999919, 992784, 995549, 995162, 992142, 991431, 992142, 995986, 995162, 998680, 991282, 995986, 994425, 994094, 992908, 992908, 992204, 999279, 990428, 992377, 990135, 993293, 992784, 999919, 997635, 999071, 990666, 992388}, "-+--+--+----+---+---+-++---++++----+-+--++++---+"));
    ExampleRunner.eq(68, "NOT VALID", new RouteIntersection().isValid(1000000, new int[]{999925, 990428, 995326, 999932, 999919, 997760, 998834, 993113, 998858, 992204, 991077, 990769, 999279, 995436, 995518, 996697, 991282, 992204, 998631, 999198, 996710, 991205, 999925, 991680, 991680, 997635, 992908, 992373, 999925, 991077, 999993, 995676, 991669, 993290, 992142, 999919, 993747, 999932}, "+-++++--++--+++----++---+++++--++-+++-"));
    ExampleRunner.eq(69, "NOT VALID", new RouteIntersection().isValid(1000000, new int[]{999919, 991282, 994468, 997311, 997311, 995162, 991077, 997760, 990135, 991205, 998602, 992373, 992796, 995986, 995986, 995986, 998631, 999501, 991669, 998834, 996496, 998067, 996496}, "-++-+++-+--+-----+-++--"));
    ExampleRunner.eq(70, "NOT VALID", new RouteIntersection().isValid(1000000, new int[]{993293, 990135, 996702, 993290, 990059, 993747, 992142, 992204, 995210, 990663, 999919, 995549, 998858, 998631, 998834, 991387, 990663, 990663, 994094, 991680, 990428, 999919, 992204, 992373, 996752, 996702, 999279, 999919, 993113, 998602, 994468, 998631, 990428, 995549, 994468, 997635, 995326, 991077, 999206, 992784, 998834, 995162, 993376, 998602, 991431, 995162, 995986, 995986, 998834, 992784}, "+-+++-+++-----++-++----+---++++---++----++--+--+-+"));
    ExampleRunner.eq(71, "NOT VALID", new RouteIntersection().isValid(1000000, new int[]{990679, 996697, 995986, 990545, 999279, 995986, 992713, 990412, 997635, 991963, 993800, 990663, 996250, 996752, 997635, 992666, 997635, 995986, 995518, 997635, 997526, 999993, 999993, 998631, 993800, 993747, 999206, 996710, 991963, 994583, 990135, 999279, 999279, 991077, 999919, 995518, 994545, 991669, 992796, 998602, 995986}, "--++----+-++-+-+-+-+++++-++--+-+-+--+---+"));
    ExampleRunner.eq(72, "NOT VALID", new RouteIntersection().isValid(1000000, new int[]{999279, 995986, 998680, 994545, 999919, 995986, 992908, 990428, 990769, 998680, 992388, 997760, 990059, 994425, 990502, 993730, 995986, 992713, 999071, 995986, 991669, 990135, 990135, 999279, 995986, 996697, 995675, 999919, 999206, 992958, 992142, 990059, 998858, 990428, 998602, 995986, 995986, 998602}, "++++--+-+++--+--++---+-----+-++-++-+++"));
    ExampleRunner.eq(73, "NOT VALID", new RouteIntersection().isValid(1000000, new int[]{998631, 995518, 998631, 991205, 998834, 991205, 998631, 998631, 995986, 999925, 995986}, "+++----++++"));
    ExampleRunner.eq(74, "NOT VALID", new RouteIntersection().isValid(1000000, new int[]{996250, 999925, 998858, 994545, 998631, 992908, 992398, 995986, 993293, 993293, 991077, 990412, 993113, 997311, 993113, 992713, 992666, 999279, 990059, 990135, 997635, 999919, 992908, 993113, 991282, 990453, 996229, 992398, 992142, 999206, 996893, 992908, 991077, 995162, 993907, 995549, 999919}, "----++++-++++-+--++---++-----+-+-++-+"));
    ExampleRunner.eq(75, "NOT VALID", new RouteIntersection().isValid(1000000, new int[]{993800, 997311, 998631, 997635, 995549, 990428, 990663, 992908, 999501, 997635, 993113, 998602, 990059, 998602, 991680, 992398, 998602, 993048, 997635, 994468, 999206, 996697, 997635, 992142, 999502, 993907, 993113, 998631, 998631, 990135, 997760, 998271, 999279, 996697, 997635, 998271, 995161, 995548, 999071, 996697, 998858, 998757, 991680, 998631, 995986, 998631, 995436, 993376, 990453}, "+---+++--+++--+-+++--++---++-++-++-++++++-+-+-+--"));
    ExampleRunner.eq(76, "VALID", new RouteIntersection().isValid(1000000, new int[]{997760, 999502, 996496, 997760, 995162, 999071, 996496, 999071, 996972, 993113, 991680, 999932, 992958, 991963, 995326, 994425, 997635, 996893, 990428, 990428, 995548, 998631, 992796, 990059, 994468, 995162, 995986, 993293, 991205, 996496, 999071, 999932, 994545, 992908, 995986, 996496, 991639, 998631, 992713}, "+-+--++---+--+++--+++---++--+-++-++--++"));
    ExampleRunner.eq(77, "VALID", new RouteIntersection().isValid(1000000, new int[]{999925, 995676, 992142, 994583, 998834, 990428, 999919, 993800, 997760, 998631, 998602, 991680, 995676, 992142, 992142, 997635, 990769, 991282, 991669, 999198, 993800, 999279, 996697, 992958, 998692, 999993}, "++--+++-++---++-++-++--+-+"));
    ExampleRunner.eq(78, "VALID", new RouteIntersection().isValid(1000000, new int[]{991669, 995986, 998680, 993376, 992784, 998858, 998680, 999279, 990135, 998680, 994094, 993376, 995162, 995161, 993293, 990289, 991077, 993747, 995549, 990412, 991639, 991077, 998757, 991680, 995986, 995986, 998858, 998680, 995986, 995549, 995986, 998858, 999279, 995676, 992666, 995671, 998834, 990545, 995986, 998680, 994545, 998680, 998631, 990412, 996697, 995986, 992204, 992377, 990502}, "-++-+--+----+---+--++--+++++-+++----+-----+++-++-"));
    ExampleRunner.eq(79, "VALID", new RouteIntersection().isValid(1000000, new int[]{997311, 996893, 998680, 992373, 995986, 998858, 999501, 992908, 996229, 999279, 996702, 995986, 992713, 995518, 999932, 994545, 996496, 997311, 997760, 998631, 990545, 999279, 999279, 999071, 990428, 990502, 995986, 995986, 998680, 995548, 998631, 994545, 996702, 998440, 993290, 998631, 991680, 997760, 991639, 997635, 995518, 995986, 999932}, "---+++---++++++-+++-++++++--+--+--++-+++---"));
    ExampleRunner.eq(80, "VALID", new RouteIntersection().isValid(1000000, new int[]{993747, 998602, 995986, 998067, 990428, 990663, 997760, 998602, 991077, 997635, 991077, 991077, 993293, 993376, 990545, 999993, 991431, 999279, 991431, 999993, 995986, 996496, 997635, 995986, 995986, 993290, 990679, 995549, 992398, 994094, 998631, 992796, 992908, 996697, 990679, 990135, 993290, 999198, 992094, 999501, 995986, 994425, 998440, 995986, 993907, 998834, 999919, 999932, 996893}, "+--+-++--+---+-++--+-++++-+++-+-++-++++--+-------"));
    ExampleRunner.eq(81, "VALID", new RouteIntersection().isValid(1000000, new int[]{998680, 998757, 994468, 995326, 991205, 994545, 990428, 993290, 999279, 996697, 997311, 995162, 993293, 997635, 998834, 992373, 998602, 998602, 994545, 990663, 992373, 997635, 992398, 994583, 991680, 993113, 996697, 999279, 992958, 993048, 993376, 990769, 997635}, "++++---+-++++--+++++--+-++--++--+"));
    ExampleRunner.eq(82, "VALID", new RouteIntersection().isValid(1000000, new int[]{992666, 998858, 992784, 992908, 991680, 999502, 998680, 996710, 995986, 990545, 990679, 992666, 990428, 993800, 991205, 990663, 995986, 992908, 992204, 991077, 999919, 990428, 990428, 990663, 995986, 992142, 999206, 992388, 990412, 998631, 995986, 999925, 992908, 998631, 998680, 997635, 995986, 992908, 991680, 993113, 993113, 991077, 995986, 993048}, "+-+--+---+--+++--+-++++++--+---++++--+++++-+"));
    ExampleRunner.eq(83, "VALID", new RouteIntersection().isValid(1000000, new int[]{992908, 995986, 996496, 999279, 996496, 996873, 990679, 992784, 995986, 991680, 999279, 993800, 998680, 995986, 999919, 991205, 998271, 990545, 997614, 993293, 993376, 997635, 999925, 995162, 990428, 990428, 997311, 996229, 999993, 993293, 999071, 999071, 998631, 998680, 993800, 997635, 992204, 996702, 997526, 997760, 998834, 997635, 991387, 992908, 990135, 997311, 992713, 992796}, "--+-+-+-++--+--+--+---++++++++++----+--+---++++-"));
    ExampleRunner.eq(84, "VALID", new RouteIntersection().isValid(1000000, new int[]{991680, 990663, 997311, 990663, 992204, 996873, 999071, 993730, 992204, 998858, 996496, 999919, 998271, 999279, 990428, 999279, 999279, 995326, 998631, 990749, 990663, 992204, 999071, 999279, 994545, 998631, 995326, 992796, 998631, 990545, 996250, 997760, 999919}, "-++-++++-+--+-+++--+++-++-+---+-+"));
    ExampleRunner.eq(85, "VALID", new RouteIntersection().isValid(1000000, new int[]{991205, 992142, 993747, 996250, 995671, 990663, 995162, 995549, 999919, 990059, 993907, 990502, 992784, 999279, 992908, 995986, 995210, 999919, 993290, 995986, 995549, 996250, 992373, 995210, 992796, 992796, 990679, 996873, 996752, 992958, 993747, 996697, 992796, 992908, 992204, 996697, 996697, 991680, 997635, 992142, 996752, 990428, 995986, 998757, 995986, 993293, 997635, 990453, 997635}, "+++-++---+++-+-+--++----+++----++++---+---++---++"));
    ExampleRunner.eq(86, "NOT VALID", new RouteIntersection().isValid(992018, new int[]{524568, 669945, 514374, 121023, 754690, 991350, 168159, 765458, 387006, 524568, 859193, 898562, 253284, 131665, 524568, 524568, 465356, 853121, 494205, 720516, 465356, 456781, 859193, 986952, 441476, 898562, 108056, 335505, 853121, 907440, 253411}, "++--+---+++-++-+++---++----+-+-"));
    ExampleRunner.eq(87, "NOT VALID", new RouteIntersection().isValid(1000000, new int[]{553636, 308594, 392437, 765458, 20338, 392437, 824639, 571384, 524568, 168159, 165924, 991350, 108056, 988451, 735536, 669945, 78830, 78830, 239094, 939814, 859193, 484909, 392437, 28026, 853121, 93500, 940783, 440977, 524568, 132377, 940783, 859193, 758759, 212982, 791969}, "+++--+---++-++---++--+-+++++-+-++++"));
    ExampleRunner.eq(88, "NOT VALID", new RouteIntersection().isValid(948736, new int[]{900616, 78830, 253284, 300844, 939103, 765940, 581069, 28026, 765458, 571384, 859193, 940783, 762903, 168159, 571384, 791451, 765940, 765940, 859193, 465356, 130873, 524568, 853121, 465356, 669945, 61078, 78566, 702647, 239094, 30416, 300844, 791969, 242440, 765458, 465356}, "-++++--+---------++-+-+++++++--+-++"));
    ExampleRunner.eq(89, "NOT VALID", new RouteIntersection().isValid(1000000, new int[]{108056, 553636, 325322, 253284, 932885, 82254, 853121, 988451, 986952, 253284, 990646, 361515, 754690, 623194, 108056, 108056, 168159, 168159, 441476, 108056, 132377, 859193, 6, 950682, 456781, 643289, 6, 253284}, "-+--+++-++++--+---++-++---++"));

    ExampleRunner.eq(90, "NOT VALID", new RouteIntersection().isValid(999713, new int[]{991350, 948414, 242440, 242440, 735536, 669945, 168159, 108056, 132377, 940783, 514374, 242440, 898562, 242440, 242440, 108056, 361663, 269315, 791969, 623194, 269416, 392437, 269416, 898562, 253284, 260341, 465356, 898562}, "-----+---++-+-+-+---++--+--+"));
    ExampleRunner.eq(91, "NOT VALID", new RouteIntersection().isValid(1000000, new int[]{78566, 361515, 242440, 940783, 976185, 269416, 859193, 132377, 465356, 571384, 465356, 108056, 108056, 765940, 467412, 939814, 773990, 340980, 623194, 30416, 131665, 765458, 900616, 108056, 465356}, "-+++++-++---+--+--+----+-"));
    ExampleRunner.eq(92, "NOT VALID", new RouteIntersection().isValid(953513, new int[]{6, 524568, 6, 168159, 898562, 524568, 132377, 108056, 571384, 6, 720516, 859193, 242440, 242440, 524568, 762903, 317306, 256008, 93500, 130873, 465356, 97188, 735536, 907440, 940783}, "-+-+-++-+--++-+-+---++-+-"));
    ExampleRunner.eq(93, "NOT VALID", new RouteIntersection().isValid(1000000, new int[]{269416, 456781, 269416, 758759, 791969, 173399, 976185, 269315, 932885, 765940, 168159, 760377, 269315, 465356, 762903, 735536, 754690, 61078, 61078, 765458, 791969, 939814, 990646, 796049, 465356, 720516, 939103, 623194, 853121, 93500, 581069, 871663, 260341, 260341, 791969, 392437}, "+---+---+++-+-+---+--+-++++---+-----"));
    ExampleRunner.eq(94, "NOT VALID", new RouteIntersection().isValid(994852, new int[]{28026, 130873, 524568, 900616, 93500, 791969, 540613, 900616, 465356, 93500, 168159, 976185, 514374, 773990, 456781, 824639, 256008, 108056, 754690, 758759, 97188, 524568, 976185, 387006, 130873, 130873, 907440, 269315, 898562, 939103, 93500, 898562, 571384, 720516, 898562, 702647, 859193, 762903, 269416, 643289, 165924, 130873, 78830, 168159, 28026, 976185, 988451, 20338, 242440, 684723}, "----+++--+-+--+-+--+-++--+-----++-+-+--+++-----+--"));
    ExampleRunner.eq(95, "NOT VALID", new RouteIntersection().isValid(966412, new int[]{28026, 342855, 253411, 467412, 760377, 702647, 294126, 325322, 888348, 108056, 948414, 871663, 392437, 108056, 939103, 758759, 30416, 540613, 524568, 898562, 78566, 581069, 294126, 898562, 898562, 20338, 269315, 269416, 524568, 571384, 440977, 833196, 440977, 467412, 494205, 735536, 231432, 754690, 765458, 467412, 168159, 20338, 168159, 762903, 484909, 833196, 791969}, "-++-++-+-++-----+-+-++++--++-++-+-----+-+------"));
    ExampleRunner.eq(96, "NOT VALID", new RouteIntersection().isValid(1000000, new int[]{999976, 999977, 999978, 999979, 999980, 999981, 999982, 999983, 999984, 999985, 999986, 999987, 999988, 999989, 999990, 999991, 999992, 999993, 999994, 999995, 999996, 999997, 999998, 999999, 1000000, 1000000, 999999, 999998, 999997, 999996, 999995, 999994, 999993, 999992, 999991, 999990, 999989, 999988, 999987, 999986, 999985, 999984, 999983, 999982, 999981, 999980, 999979, 999978, 999977, 999976}, "+++++++++++++++++++++++++-------------------------"));
    ExampleRunner.eq(97, "VALID", new RouteIntersection().isValid(31415, new int[]{31415, 31415, 31415, 31415, 31415, 31415, 31415, 31415, 31415, 31415, 31415, 31415, 31415, 31415, 31415, 31415, 31415, 31415, 31415, 31415, 31415, 31415, 31415, 31415, 31415, 31415, 31415, 31415, 31415, 31415, 31415, 31415, 31415, 31415, 31415, 31415, 31415, 31415, 31415, 31415, 31415, 31415, 31415, 31415, 31415, 31415, 31415, 31415, 31415, 31415}, "++++++++++++++++++++++++++++++++++++++++++++++++++"));
    ExampleRunner.eq(98, "VALID", new RouteIntersection().isValid(1, new int[]{1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}, "--------------------------------------------------"));
    ExampleRunner.eq(99, "VALID", new RouteIntersection().isValid(1000000, new int[]{1000000, 1000000, 1000000, 1000000, 1000000, 1000000, 1000000, 1000000, 1000000, 1000000, 1000000, 1000000, 1000000, 1000000, 1000000, 1000000, 1000000, 1000000, 1000000, 1000000, 1000000, 1000000, 1000000, 1000000, 1000000, 1000000, 1000000, 1000000, 1000000, 1000000, 1000000, 1000000, 1000000, 1000000, 1000000, 1000000, 1000000, 1000000, 1000000, 1000000, 1000000, 1000000, 1000000, 1000000, 1000000, 1000000, 1000000, 1000000, 1000000, 1000000}, "++++++++++++++++++++++++++++++++++++++++++++++++++"));
    ExampleRunner.eq(100, "NOT VALID", new RouteIntersection().isValid(1000000000, new int[]{998602041, 999206041, 990663041, 991282041, 998680041, 994545041, 996697041, 993293041, 999071041, 993293041, 994545041, 994545041, 997635041, 994094041, 999071041, 999919041, 997635041, 994545041, 993376041, 996972041, 996496041, 993376041, 998602041, 997760041, 991680041, 990428041}, "--+--+---+-+---+-+-+-+++-+"));
    ExampleRunner.eq(101, "NOT VALID", new RouteIntersection().isValid(1000000000, new int[]{993376467, 998858467, 993376467, 991077467, 999279467, 994094467, 996702467, 999279467, 999206467, 990059467, 999206467, 993800467, 994425467, 995549467, 999279467, 991431467, 995986467, 995549467, 992142467, 998602467, 999919467, 992784467, 995549467, 995162467, 992142467, 991431467, 992142467, 995986467, 995162467, 998680467, 991282467, 995986467, 994425467, 994094467, 992908467, 992908467, 992204467, 999279467, 990428467, 992377467, 990135467, 993293467, 992784467, 999919467, 997635467, 999071467, 990666467, 992388467}, "-+--+--+----+---+---+-++---++++----+-+--++++---+"));
    ExampleRunner.eq(102, "NOT VALID", new RouteIntersection().isValid(1000000000, new int[]{999925334, 990428334, 995326334, 999932334, 999919334, 997760334, 998834334, 993113334, 998858334, 992204334, 991077334, 990769334, 999279334, 995436334, 995518334, 996697334, 991282334, 992204334, 998631334, 999198334, 996710334, 991205334, 999925334, 991680334, 991680334, 997635334, 992908334, 992373334, 999925334, 991077334, 999993334, 995676334, 991669334, 993290334, 992142334, 999919334, 993747334, 999932334}, "+-++++--++--+++----++---+++++--++-+++-"));
    ExampleRunner.eq(103, "NOT VALID", new RouteIntersection().isValid(1000000000, new int[]{999919500, 991282500, 994468500, 997311500, 997311500, 995162500, 991077500, 997760500, 990135500, 991205500, 998602500, 992373500, 992796500, 995986500, 995986500, 995986500, 998631500, 999501500, 991669500, 998834500, 996496500, 998067500, 996496500}, "-++-+++-+--+-----+-++--"));
    ExampleRunner.eq(104, "NOT VALID", new RouteIntersection().isValid(1000000000, new int[]{993293169, 990135169, 996702169, 993290169, 990059169, 993747169, 992142169, 992204169, 995210169, 990663169, 999919169, 995549169, 998858169, 998631169, 998834169, 991387169, 990663169, 990663169, 994094169, 991680169, 990428169, 999919169, 992204169, 992373169, 996752169, 996702169, 999279169, 999919169, 993113169, 998602169, 994468169, 998631169, 990428169, 995549169, 994468169, 997635169, 995326169, 991077169, 999206169, 992784169, 998834169, 995162169, 993376169, 998602169, 991431169, 995162169, 995986169, 995986169, 998834169, 992784169}, "+-+++-+++-----++-++----+---++++---++----++--+--+-+"));
    ExampleRunner.eq(105, "NOT VALID", new RouteIntersection().isValid(1000000000, new int[]{990679724, 996697724, 995986724, 990545724, 999279724, 995986724, 992713724, 990412724, 997635724, 991963724, 993800724, 990663724, 996250724, 996752724, 997635724, 992666724, 997635724, 995986724, 995518724, 997635724, 997526724, 999993724, 999993724, 998631724, 993800724, 993747724, 999206724, 996710724, 991963724, 994583724, 990135724, 999279724, 999279724, 991077724, 999919724, 995518724, 994545724, 991669724, 992796724, 998602724, 995986724}, "--++----+-++-+-+-+-+++++-++--+-+-+--+---+"));
    ExampleRunner.eq(106, "NOT VALID", new RouteIntersection().isValid(1000000000, new int[]{999279478, 995986478, 998680478, 994545478, 999919478, 995986478, 992908478, 990428478, 990769478, 998680478, 992388478, 997760478, 990059478, 994425478, 990502478, 993730478, 995986478, 992713478, 999071478, 995986478, 991669478, 990135478, 990135478, 999279478, 995986478, 996697478, 995675478, 999919478, 999206478, 992958478, 992142478, 990059478, 998858478, 990428478, 998602478, 995986478, 995986478, 998602478}, "++++--+-+++--+--++---+-----+-++-++-+++"));
    ExampleRunner.eq(107, "NOT VALID", new RouteIntersection().isValid(1000000000, new int[]{998631358, 995518358, 998631358, 991205358, 998834358, 991205358, 998631358, 998631358, 995986358, 999925358, 995986358}, "+++----++++"));
    ExampleRunner.eq(108, "NOT VALID", new RouteIntersection().isValid(1000000000, new int[]{996250962, 999925962, 998858962, 994545962, 998631962, 992908962, 992398962, 995986962, 993293962, 993293962, 991077962, 990412962, 993113962, 997311962, 993113962, 992713962, 992666962, 999279962, 990059962, 990135962, 997635962, 999919962, 992908962, 993113962, 991282962, 990453962, 996229962, 992398962, 992142962, 999206962, 996893962, 992908962, 991077962, 995162962, 993907962, 995549962, 999919962}, "----++++-++++-+--++---++-----+-+-++-+"));
    ExampleRunner.eq(109, "NOT VALID", new RouteIntersection().isValid(1000000000, new int[]{993800464, 997311464, 998631464, 997635464, 995549464, 990428464, 990663464, 992908464, 999501464, 997635464, 993113464, 998602464, 990059464, 998602464, 991680464, 992398464, 998602464, 993048464, 997635464, 994468464, 999206464, 996697464, 997635464, 992142464, 999502464, 993907464, 993113464, 998631464, 998631464, 990135464, 997760464, 998271464, 999279464, 996697464, 997635464, 998271464, 995161464, 995548464, 999071464, 996697464, 998858464, 998757464, 991680464, 998631464, 995986464, 998631464, 995436464, 993376464, 990453464}, "+---+++--+++--+-+++--++---++-++-++-++++++-+-+-+--"));
    ExampleRunner.eq(110, "VALID", new RouteIntersection().isValid(1000000000, new int[]{997760705, 999502705, 996496705, 997760705, 995162705, 999071705, 996496705, 999071705, 996972705, 993113705, 991680705, 999932705, 992958705, 991963705, 995326705, 994425705, 997635705, 996893705, 990428705, 990428705, 995548705, 998631705, 992796705, 990059705, 994468705, 995162705, 995986705, 993293705, 991205705, 996496705, 999071705, 999932705, 994545705, 992908705, 995986705, 996496705, 991639705, 998631705, 992713705}, "+-+--++---+--+++--+++---++--+-++-++--++"));
    ExampleRunner.eq(111, "VALID", new RouteIntersection().isValid(1000000000, new int[]{999925145, 995676145, 992142145, 994583145, 998834145, 990428145, 999919145, 993800145, 997760145, 998631145, 998602145, 991680145, 995676145, 992142145, 992142145, 997635145, 990769145, 991282145, 991669145, 999198145, 993800145, 999279145, 996697145, 992958145, 998692145, 999993145}, "++--+++-++---++-++-++--+-+"));
    ExampleRunner.eq(112, "VALID", new RouteIntersection().isValid(1000000000, new int[]{991669281, 995986281, 998680281, 993376281, 992784281, 998858281, 998680281, 999279281, 990135281, 998680281, 994094281, 993376281, 995162281, 995161281, 993293281, 990289281, 991077281, 993747281, 995549281, 990412281, 991639281, 991077281, 998757281, 991680281, 995986281, 995986281, 998858281, 998680281, 995986281, 995549281, 995986281, 998858281, 999279281, 995676281, 992666281, 995671281, 998834281, 990545281, 995986281, 998680281, 994545281, 998680281, 998631281, 990412281, 996697281, 995986281, 992204281, 992377281, 990502281}, "-++-+--+----+---+--++--+++++-+++----+-----+++-++-"));
    ExampleRunner.eq(113, "VALID", new RouteIntersection().isValid(1000000000, new int[]{997311827, 996893827, 998680827, 992373827, 995986827, 998858827, 999501827, 992908827, 996229827, 999279827, 996702827, 995986827, 992713827, 995518827, 999932827, 994545827, 996496827, 997311827, 997760827, 998631827, 990545827, 999279827, 999279827, 999071827, 990428827, 990502827, 995986827, 995986827, 998680827, 995548827, 998631827, 994545827, 996702827, 998440827, 993290827, 998631827, 991680827, 997760827, 991639827, 997635827, 995518827, 995986827, 999932827}, "---+++---++++++-+++-++++++--+--+--++-+++---"));
    ExampleRunner.eq(114, "VALID", new RouteIntersection().isValid(1000000000, new int[]{993747961, 998602961, 995986961, 998067961, 990428961, 990663961, 997760961, 998602961, 991077961, 997635961, 991077961, 991077961, 993293961, 993376961, 990545961, 999993961, 991431961, 999279961, 991431961, 999993961, 995986961, 996496961, 997635961, 995986961, 995986961, 993290961, 990679961, 995549961, 992398961, 994094961, 998631961, 992796961, 992908961, 996697961, 990679961, 990135961, 993290961, 999198961, 992094961, 999501961, 995986961, 994425961, 998440961, 995986961, 993907961, 998834961, 999919961, 999932961, 996893961}, "+--+-++--+---+-++--+-++++-+++-+-++-++++--+-------"));
    ExampleRunner.eq(115, "VALID", new RouteIntersection().isValid(1000000000, new int[]{998680491, 998757491, 994468491, 995326491, 991205491, 994545491, 990428491, 993290491, 999279491, 996697491, 997311491, 995162491, 993293491, 997635491, 998834491, 992373491, 998602491, 998602491, 994545491, 990663491, 992373491, 997635491, 992398491, 994583491, 991680491, 993113491, 996697491, 999279491, 992958491, 993048491, 993376491, 990769491, 997635491}, "++++---+-++++--+++++--+-++--++--+"));
    ExampleRunner.eq(116, "VALID", new RouteIntersection().isValid(1000000000, new int[]{992666995, 998858995, 992784995, 992908995, 991680995, 999502995, 998680995, 996710995, 995986995, 990545995, 990679995, 992666995, 990428995, 993800995, 991205995, 990663995, 995986995, 992908995, 992204995, 991077995, 999919995, 990428995, 990428995, 990663995, 995986995, 992142995, 999206995, 992388995, 990412995, 998631995, 995986995, 999925995, 992908995, 998631995, 998680995, 997635995, 995986995, 992908995, 991680995, 993113995, 993113995, 991077995, 995986995, 993048995}, "+-+--+---+--+++--+-++++++--+---++++--+++++-+"));
    ExampleRunner.eq(117, "VALID", new RouteIntersection().isValid(1000000000, new int[]{992908942, 995986942, 996496942, 999279942, 996496942, 996873942, 990679942, 992784942, 995986942, 991680942, 999279942, 993800942, 998680942, 995986942, 999919942, 991205942, 998271942, 990545942, 997614942, 993293942, 993376942, 997635942, 999925942, 995162942, 990428942, 990428942, 997311942, 996229942, 999993942, 993293942, 999071942, 999071942, 998631942, 998680942, 993800942, 997635942, 992204942, 996702942, 997526942, 997760942, 998834942, 997635942, 991387942, 992908942, 990135942, 997311942, 992713942, 992796942}, "--+-+-+-++--+--+--+---++++++++++----+--+---++++-"));
    ExampleRunner.eq(118, "VALID", new RouteIntersection().isValid(1000000000, new int[]{991680827, 990663827, 997311827, 990663827, 992204827, 996873827, 999071827, 993730827, 992204827, 998858827, 996496827, 999919827, 998271827, 999279827, 990428827, 999279827, 999279827, 995326827, 998631827, 990749827, 990663827, 992204827, 999071827, 999279827, 994545827, 998631827, 995326827, 992796827, 998631827, 990545827, 996250827, 997760827, 999919827}, "-++-++++-+--+-+++--+++-++-+---+-+"));
    ExampleRunner.eq(119, "VALID", new RouteIntersection().isValid(1000000000, new int[]{991205436, 992142436, 993747436, 996250436, 995671436, 990663436, 995162436, 995549436, 999919436, 990059436, 993907436, 990502436, 992784436, 999279436, 992908436, 995986436, 995210436, 999919436, 993290436, 995986436, 995549436, 996250436, 992373436, 995210436, 992796436, 992796436, 990679436, 996873436, 996752436, 992958436, 993747436, 996697436, 992796436, 992908436, 992204436, 996697436, 996697436, 991680436, 997635436, 992142436, 996752436, 990428436, 995986436, 998757436, 995986436, 993293436, 997635436, 990453436, 997635436}, "+++-++---+++-+-+--++----+++----++++---+---++---++"));
    ExampleRunner.eq(120, "NOT VALID", new RouteIntersection().isValid(1000000000, new int[]{524568391, 669945391, 514374391, 121023391, 754690391, 991350391, 168159391, 765458391, 387006391, 524568391, 859193391, 898562391, 253284391, 131665391, 524568391, 524568391, 465356391, 853121391, 494205391, 720516391, 465356391, 456781391, 859193391, 986952391, 441476391, 898562391, 108056391, 335505391, 853121391, 907440391, 253411391}, "++--+---+++-++-+++---++----+-+-"));
    ExampleRunner.eq(121, "NOT VALID", new RouteIntersection().isValid(1000000000, new int[]{553636604, 308594604, 392437604, 765458604, 20338604, 392437604, 824639604, 571384604, 524568604, 168159604, 165924604, 991350604, 108056604, 988451604, 735536604, 669945604, 78830604, 78830604, 239094604, 939814604, 859193604, 484909604, 392437604, 28026604, 853121604, 93500604, 940783604, 440977604, 524568604, 132377604, 940783604, 859193604, 758759604, 212982604, 791969604}, "+++--+---++-++---++--+-+++++-+-++++"));
    ExampleRunner.eq(122, "NOT VALID", new RouteIntersection().isValid(1000000000, new int[]{900616902, 78830902, 253284902, 300844902, 939103902, 765940902, 581069902, 28026902, 765458902, 571384902, 859193902, 940783902, 762903902, 168159902, 571384902, 791451902, 765940902, 765940902, 859193902, 465356902, 130873902, 524568902, 853121902, 465356902, 669945902, 61078902, 78566902, 702647902, 239094902, 30416902, 300844902, 791969902, 242440902, 765458902, 465356902}, "-++++--+---------++-+-+++++++--+-++"));
    ExampleRunner.eq(123, "NOT VALID", new RouteIntersection().isValid(1000000000, new int[]{108056153, 553636153, 325322153, 253284153, 932885153, 82254153, 853121153, 988451153, 986952153, 253284153, 990646153, 361515153, 754690153, 623194153, 108056153, 108056153, 168159153, 168159153, 441476153, 108056153, 132377153, 859193153, 6153, 950682153, 456781153, 643289153, 6153, 253284153}, "-+--+++-++++--+---++-++---++"));
    ExampleRunner.eq(124, "NOT VALID", new RouteIntersection().isValid(1000000000, new int[]{991350292, 948414292, 242440292, 242440292, 735536292, 669945292, 168159292, 108056292, 132377292, 940783292, 514374292, 242440292, 898562292, 242440292, 242440292, 108056292, 361663292, 269315292, 791969292, 623194292, 269416292, 392437292, 269416292, 898562292, 253284292, 260341292, 465356292, 898562292}, "-----+---++-+-+-+---++--+--+"));
    ExampleRunner.eq(125, "NOT VALID", new RouteIntersection().isValid(1000000000, new int[]{78566382, 361515382, 242440382, 940783382, 976185382, 269416382, 859193382, 132377382, 465356382, 571384382, 465356382, 108056382, 108056382, 765940382, 467412382, 939814382, 773990382, 340980382, 623194382, 30416382, 131665382, 765458382, 900616382, 108056382, 465356382}, "-+++++-++---+--+--+----+-"));
    ExampleRunner.eq(126, "NOT VALID", new RouteIntersection().isValid(1000000000, new int[]{6421, 524568421, 6421, 168159421, 898562421, 524568421, 132377421, 108056421, 571384421, 6421, 720516421, 859193421, 242440421, 242440421, 524568421, 762903421, 317306421, 256008421, 93500421, 130873421, 465356421, 97188421, 735536421, 907440421, 940783421}, "-+-+-++-+--++-+-+---++-+-"));
    ExampleRunner.eq(127, "NOT VALID", new RouteIntersection().isValid(1000000000, new int[]{269416716, 456781716, 269416716, 758759716, 791969716, 173399716, 976185716, 269315716, 932885716, 765940716, 168159716, 760377716, 269315716, 465356716, 762903716, 735536716, 754690716, 61078716, 61078716, 765458716, 791969716, 939814716, 990646716, 796049716, 465356716, 720516716, 939103716, 623194716, 853121716, 93500716, 581069716, 871663716, 260341716, 260341716, 791969716, 392437716}, "+---+---+++-+-+---+--+-++++---+-----"));
    ExampleRunner.eq(128, "NOT VALID", new RouteIntersection().isValid(1000000000, new int[]{28026718, 130873718, 524568718, 900616718, 93500718, 791969718, 540613718, 900616718, 465356718, 93500718, 168159718, 976185718, 514374718, 773990718, 456781718, 824639718, 256008718, 108056718, 754690718, 758759718, 97188718, 524568718, 976185718, 387006718, 130873718, 130873718, 907440718, 269315718, 898562718, 939103718, 93500718, 898562718, 571384718, 720516718, 898562718, 702647718, 859193718, 762903718, 269416718, 643289718, 165924718, 130873718, 78830718, 168159718, 28026718, 976185718, 988451718, 20338718, 242440718, 684723718}, "----+++--+-+--+-+--+-++--+-----++-+-+--+++-----+--"));
    ExampleRunner.eq(129, "NOT VALID", new RouteIntersection().isValid(1000000000, new int[]{28026895, 342855895, 253411895, 467412895, 760377895, 702647895, 294126895, 325322895, 888348895, 108056895, 948414895, 871663895, 392437895, 108056895, 939103895, 758759895, 30416895, 540613895, 524568895, 898562895, 78566895, 581069895, 294126895, 898562895, 898562895, 20338895, 269315895, 269416895, 524568895, 571384895, 440977895, 833196895, 440977895, 467412895, 494205895, 735536895, 231432895, 754690895, 765458895, 467412895, 168159895, 20338895, 168159895, 762903895, 484909895, 833196895, 791969895}, "-++-++-+-++-----+-+-++++--++-++-+-----+-+------"));
    ExampleRunner.eq(130, "NOT VALID", new RouteIntersection().isValid(1000000000, new int[]{1000000000, 999999999, 999999998, 999999997, 999999996, 999999995, 999999994, 999999993, 999999992, 999999991, 999999990, 999999989, 999999988, 999999987, 999999986, 999999985, 999999984, 999999983, 999999982, 999999981, 999999980, 999999979, 999999978, 999999977, 999999976, 999999976, 999999977, 999999978, 999999979, 999999980, 999999981, 999999982, 999999983, 999999984, 999999985, 999999986, 999999987, 999999988, 999999989, 999999990, 999999991, 999999992, 999999993, 999999994, 999999995, 999999996, 999999997, 999999998, 999999999, 1000000000}, "+++++++++++++++++++++++++-------------------------"));
    ExampleRunner.eq(131, "VALID", new RouteIntersection().isValid(1000000000, new int[]{1000000000, 1000000000, 1000000000, 1000000000, 1000000000, 1000000000, 1000000000, 1000000000, 1000000000, 1000000000, 1000000000, 1000000000, 1000000000, 1000000000, 1000000000, 1000000000, 1000000000, 1000000000, 1000000000, 1000000000, 1000000000, 1000000000, 1000000000, 1000000000, 1000000000, 1000000000, 1000000000, 1000000000, 1000000000, 1000000000, 1000000000, 1000000000, 1000000000, 1000000000, 1000000000, 1000000000, 1000000000, 1000000000, 1000000000, 1000000000, 1000000000, 1000000000, 1000000000, 1000000000, 1000000000, 1000000000, 1000000000, 1000000000, 1000000000, 1000000000}, "++++++++++++++++++++++++++++++++++++++++++++++++++"));
    ExampleRunner.eq(132, "VALID", new RouteIntersection().isValid(1000000000, new int[]{1000000000, 999999999, 999999998, 999999997, 999999996, 999999995, 999999994, 999999993, 999999992, 999999991, 999999990, 999999989, 999999988, 999999987, 999999986, 999999985, 999999984, 999999983, 999999982, 999999981, 999999980, 999999979, 999999978, 999999977, 999999976, 999999975, 999999974, 999999973, 999999972, 999999971, 999999970, 999999969, 999999968, 999999967, 999999966, 999999965, 999999964, 999999963, 999999962, 999999961, 999999960, 999999959, 999999958, 999999957, 999999956, 999999955, 999999954, 999999953, 999999952, 999999951}, "++++++++++++++++++++++++++++++++++++++++++++++++++"));
    ExampleRunner.eq(133, "NOT VALID", new RouteIntersection().isValid(1000000000, new int[]{1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}, "+++++-----+++++-----+++++-----+++++-----++++----+"));
    ExampleRunner.eq(134, "VALID", new RouteIntersection().isValid(1000000000, new int[]{999999999, 999999998, 999999997, 999999996, 999999995, 999999996, 999999995, 999999995, 999999999, 999999994, 999999993, 999999992, 999999991, 999999990, 999999989, 999999988, 999999987, 999999986, 999999985, 999999984, 999999983, 999999982, 1, 111111111, 999999981, 999999980, 999999979, 999999978, 999999977, 999999976, 999999975, 999999974, 999999973, 999999972, 999999971, 999999970, 999999969, 999999968, 999999967, 999999966, 999999965, 999999964, 999999963, 999999962, 999999961, 999999960, 999999959, 999999958, 999999957, 999999956}, "++++++++++++++++++++++++++++++++++++++++++++++++-+"));
    ExampleRunner.eq(135, "VALID", new RouteIntersection().isValid(1000000000, new int[]{1}, "+"));
    ExampleRunner.eq(136, "VALID", new RouteIntersection().isValid(100000000, new int[]{1, 999999}, "+-"));
    ExampleRunner.eq(137, "VALID", new RouteIntersection().isValid(100000000, new int[]{1}, "+"));
    ExampleRunner.eq(138, "VALID", new RouteIntersection().isValid(8, new int[]{2, 2, 5, 4, 3, 8, 5, 4}, "+++--+-+"));
    ExampleRunner.eq(139, "NOT VALID", new RouteIntersection().isValid(100000000, new int[]{1000000, 100000000, 100000, 200, 300, 100000000, 100000000, 400, 500, 600, 700, 100000000, 8, 9, 8, 9, 524, 45, 3, 26, 564, 35, 100, 896413, 341}, "+-+-+-+-+-+-+-+-+-+-+-+-+"));
    ExampleRunner.eq(140, "VALID", new RouteIntersection().isValid(1000000000, new int[]{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10}, "+-+++++++-+-+++++++-+-+++++++-+-+++++++-+-+++++++-"));
    ExampleRunner.eq(141, "VALID", new RouteIntersection().isValid(1000000000, new int[]{410001, 184670001, 63340001, 265000001, 63340001, 157240001, 114780001, 293580001, 1000000000, 244640001, 57050001, 281450001, 232810001, 1, 99610001, 4910001, 29950001, 119420001, 48270001, 54360001, 323910001, 146040001, 39020001, 1530001, 2920001, 123820001, 1000000000, 187160001, 197180001, 198950001, 146040001, 217260001, 147710001, 54360001, 48270001, 199120001, 256670001, 262990001, 170350001, 98940001, 287030001, 238110001, 313220001, 303330001, 176730001, 46640001, 151410001, 77110001, 282530001, 68680001}, "+--++++++--+---------+-+---++-++------+--+-++---++"));
    ExampleRunner.eq(142, "VALID", new RouteIntersection().isValid(1, new int[]{1}, "-"));
    ExampleRunner.eq(143, "NOT VALID", new RouteIntersection().isValid(99063000, new int[]{833196, 524568, 361663, 108056, 28026, 824639, 269315, 440977, 440977, 765458, 988451, 242440, 948414, 130873, 773990, 765458, 130873, 28026, 853121, 553636, 581069, 82254, 735536, 833196, 898562, 898562, 940783, 988451, 540613, 317306, 623194, 940783, 571384, 988451, 108056, 514374, 97664}, "--+---+-+++-+-+---++-++-+---+-+--+-++"));
    ExampleRunner.eq(144, "VALID", new RouteIntersection().isValid(3, new int[]{1, 2, 3, 1, 2}, "+++--"));
    ExampleRunner.eq(145, "NOT VALID", new RouteIntersection().isValid(1000000000, new int[]{833196, 524568, 361663, 108056, 28026, 824639, 269315, 440977, 440977, 765458, 988451, 242440, 948414, 130873, 773990, 765458, 130873, 28026, 853121, 553636, 581069, 82254, 735536, 833196, 898562, 898562, 940783, 988451, 540613, 317306, 623194, 940783, 571384, 988451, 108056, 514374, 97664}, "--+---+-+++-+-+---++-++-+---+-+--+-++"));
    ExampleRunner.eq(146, "VALID", new RouteIntersection().isValid(1000000000, new int[]{1000000000, 1, 1000000000, 1, 1}, "+++--"));
    ExampleRunner.eq(147, "VALID", new RouteIntersection().isValid(6, new int[]{3, 3, 6}, "++-"));
    ExampleRunner.eq(148, "VALID", new RouteIntersection().isValid(1000000000, new int[]{1000000000, 1}, "++"));
    ExampleRunner.eq(149, "VALID", new RouteIntersection().isValid(1000000000, new int[]{1, 1000000000, 2}, "+++"));
    ExampleRunner.eq(150, "VALID", new RouteIntersection().isValid(1000000000, new int[]{1000000000}, "+"));
    ExampleRunner.eq(151, "VALID", new RouteIntersection().isValid(100, new int[]{1, 1, 1, 2, 2, 3, 3, 3, 3}, "+++++++++"));
    ExampleRunner.eq(152, "VALID", new RouteIntersection().isValid(1000000000, new int[]{1, 2, 3, 1, 2, 3232, 12, 3}, "+++--++-"));
    ExampleRunner.eq(153, "VALID", new RouteIntersection().isValid(1000000000, new int[]{1, 2, 3, 4}, "++++"));
    ExampleRunner.eq(154, "VALID", new RouteIntersection().isValid(2, new int[]{1, 2}, "+-"));
    ExampleRunner.eq(155, "VALID", new RouteIntersection().isValid(1000000000, new int[]{1, 2, 3, 4, 5}, "+++++"));
    ExampleRunner.eq(156, "VALID", new RouteIntersection().isValid(1000000000, new int[]{100000, 1000000, 10000, 99999, 1, 10000, 555555, 666, 1, 10000, 555555, 666}, "+-+-+-++--++"));
    ExampleRunner.eq(157, "VALID", new RouteIntersection().isValid(1000000000, new int[]{1000000000, 1000000000, 1000000000, 1000000000, 1000000000, 1000000000, 1000000000, 1000000000, 1000000000, 1000000000, 1000000000, 1000000000, 1000000000, 1000000000, 1000000000, 1000000000, 1000000000, 1000000000, 1000000000, 1000000000, 1000000000, 1000000000, 1000000000, 1000000000, 1000000000, 1000000000, 1000000000, 1000000000, 1000000000, 1000000000, 1000000000, 1000000000, 1000000000, 1000000000, 1000000000, 1000000000, 1000000000, 1000000000, 1000000000, 1000000000, 1000000000, 1000000000, 1000000000, 1000000000, 1000000000, 1000000000, 1000000000, 1000000000, 1000000000, 1000000000}, "++++++++++++++++++++++++++++++++++++++++++++++++++"));
    ExampleRunner.eq(158, "NOT VALID", new RouteIntersection().isValid(1, new int[]{1, 1}, "+-"));
    ExampleRunner.eq(159, "VALID", new RouteIntersection().isValid(1000000000, new int[]{1, 2}, "+-"));
    ExampleRunner.eq(160, "VALID", new RouteIntersection().isValid(999999999, new int[]{999999991, 999999992, 999999993, 999999994, 999999995, 999999996, 999999997, 999999998, 50, 1234}, "+--+--+---"));
    ExampleRunner.eq(161, "VALID", new RouteIntersection().isValid(1000000000, new int[]{164435643, 164435644, 164435443, 164432643, 644356439, 944356437}, "++--++"));
    ExampleRunner.eq(162, "VALID", new RouteIntersection().isValid(1000000000, new int[]{1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}, "++++++++++++++++++++++++++++++++++++++++++++++++++"));
    ExampleRunner.eq(163, "NOT VALID", new RouteIntersection().isValid(1000000000, new int[]{34, 746345, 235623, 946563332, 34, 746345, 235623, 946563332}, "+--+-++-"));
    ExampleRunner.eq(164, "VALID", new RouteIntersection().isValid(1000000, new int[]{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50}, "++++++++++++++++++++++++++++++++++++++++++++++++++"));
    ExampleRunner.eq(165, "VALID", new RouteIntersection().isValid(1, new int[]{1}, "+"));
    ExampleRunner.eq(166, "VALID", new RouteIntersection().isValid(1000000000, new int[]{3, 4, 99, 999999}, "++++"));
    ExampleRunner.eq(167, "VALID", new RouteIntersection().isValid(1000000000, new int[]{1, 2, 3, 4, 5, 6, 5, 4, 3, 2, 1}, "++++++-----"));
    ExampleRunner.eq(168, "NOT VALID", new RouteIntersection().isValid(999999999, new int[]{833196, 524568, 361663, 108056, 28026, 824639, 269315, 440977, 440977, 765458, 988451, 242440, 948414, 130873, 773990, 765458, 130873, 28026, 853121, 553636, 581069, 82254, 735536, 833196, 898562, 898562, 940783, 988451, 540613, 317306, 623194, 940783, 571384, 988451, 108056, 514374, 97664, 999999998, 999999997, 999999996, 999999998, 999999996}, "--+---+-+++-+-+---++-++-+---+-+--+-+++-+-+"));
    ExampleRunner.eq(169, "VALID", new RouteIntersection().isValid(1000000000, new int[]{99999999, 99999998, 99999997, 99999996, 99999995, 99999994, 99999993, 99999992, 99999991, 99999990, 99999989, 99999988, 99999987, 99999986, 99999985, 1, 2, 3, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 25, 26, 26, 26, 26, 1, 1, 2}, "++++++++++++++++++++++++++++++++++++++++++++++++++"));
    ExampleRunner.eq(170, "NOT VALID", new RouteIntersection().isValid(1, new int[]{1, 1, 1, 1, 1, 1}, "+++++-"));
    ExampleRunner.eq(171, "VALID", new RouteIntersection().isValid(1000000000, new int[]{1000000000, 1}, "+-"));
    ExampleRunner.eq(172, "VALID", new RouteIntersection().isValid(1000000000, new int[]{1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 11, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}, "++++++++++++++++++++++++++++++++++++++++++++++++++"));
    ExampleRunner.eq(173, "NOT VALID", new RouteIntersection().isValid(1000000000, new int[]{1, 1, 999999998, 999999997, 999999996, 999999995, 999999996, 999999995, 999999995, 999999999, 999999994, 999999993, 999999992, 999999991, 999999990, 999999989, 999999988, 999999987, 999999986, 999999985, 999999984, 999999983, 999999982, 1, 111111111, 999999981, 999999998, 999999997, 999999996, 999999995, 999999996, 999999995, 999999995, 999999999, 999999994, 999999993, 999999992, 999999991, 999999990, 999999989, 999999988, 999999987, 999999986, 999999985, 999999984, 999999983, 999999982, 1, 111111111, 999999981}, "++++++++++++++++++++++++++------------------------"));
    ExampleRunner.eq(174, "NOT VALID", new RouteIntersection().isValid(999999999, new int[]{833196, 524568, 361663, 108056, 28026, 824639, 269315, 440977, 440977, 765458, 988451, 242440, 948414, 130873, 773990, 765458, 130873, 28026, 853121, 553636, 581069, 82254, 735536, 833196, 898562, 898562, 940783, 988451, 540613, 317306, 623194, 940783, 571384, 988451, 108056, 514374, 97664}, "--+---+-+++-+-+---++-++-+---+-+--+-++"));
    ExampleRunner.eq(175, "VALID", new RouteIntersection().isValid(10, new int[]{10, 10}, "++"));
    ExampleRunner.eq(176, "VALID", new RouteIntersection().isValid(1000000000, new int[]{1, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49}, "++-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+"));
    ExampleRunner.eq(177, "VALID", new RouteIntersection().isValid(1000000000, new int[]{999999999, 888888888}, "++"));
    ExampleRunner.eq(178, "VALID", new RouteIntersection().isValid(1000000000, new int[]{1, 2, 3, 1}, "++++"));
    ExampleRunner.eq(179, "VALID", new RouteIntersection().isValid(1000000000, new int[]{1, 1, 2, 2, 1, 2}, "++---+"));
    ExampleRunner.eq(180, "VALID", new RouteIntersection().isValid(100, new int[]{1, 2, 1, 3, 2}, "++-+-"));
    ExampleRunner.eq(181, "NOT VALID", new RouteIntersection().isValid(1000000000, new int[]{1, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10}, "+----------"));
    ExampleRunner.eq(182, "VALID", new RouteIntersection().isValid(999999999, new int[]{1, 978987987, 45665445, 678878786, 567765765, 345543454, 654456654, 45646, 45645665, 456654654, 456654, 76556776, 765567765, 4565445, 56776656, 44566554, 3345543, 11, 12, 13, 1111114, 15, 11, 12, 13, 14, 15, 16, 17, 22, 23, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 17, 18, 19, 20, 21, 22, 23, 24}, "----++++----++++----++++++++++-----+-+-++++++++++"));
    ExampleRunner.eq(183, "NOT VALID", new RouteIntersection().isValid(1000000000, new int[]{34, 746345, 235623, 346563332, 34, 746345, 235623, 346563332}, "+--+-++-"));
    ExampleRunner.eq(184, "VALID", new RouteIntersection().isValid(1000000000, new int[]{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12}, "+++---++--+-"));
    ExampleRunner.eq(185, "VALID", new RouteIntersection().isValid(1000000000, new int[]{2345, 436432, 131}, "+--"));
    ExampleRunner.eq(186, "VALID", new RouteIntersection().isValid(1000000000, new int[]{254356, 346346, 23542, 34525, 523532, 5346}, "+++-+-"));
    ExampleRunner.eq(187, "VALID", new RouteIntersection().isValid(344447, new int[]{1, 2, 3, 1, 2, 3}, "++-++-"));
    ExampleRunner.eq(188, "NOT VALID", new RouteIntersection().isValid(3, new int[]{1, 2, 1, 3, 2, 3}, "++-+--"));
    ExampleRunner.eq(189, "VALID", new RouteIntersection().isValid(1000000000, new int[]{100000000, 1000000000}, "+-"));
    ExampleRunner.eq(190, "VALID", new RouteIntersection().isValid(1000000000, new int[]{999999999, 999999999, 1, 5, 7, 5, 1, 999999999, 999999999}, "--+--+-++"));
    ExampleRunner.eq(191, "VALID", new RouteIntersection().isValid(1000000000, new int[]{1000000000, 1000000000}, "++"));
  }
}
